<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="*|/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="text()|@*">
    <xsl:value-of select="."/>
  </xsl:template>

  <xsl:template match='nbsp' name='nbsp'>
    <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
  </xsl:template>

  <xsl:template name="ggBirthRecursive">
    <xsl:param name="index" select="1"/>
    <xsl:param name="limit" select="31"/>
    <option value="{$index}">
      <xsl:value-of select="$index"/>
    </option>
    <xsl:if test="$index &lt; $limit">
      <xsl:call-template name="ggBirthRecursive">
        <xsl:with-param name="index" select="$index + 1"/>
        <xsl:with-param name="limit" select="$limit"/>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>


  <xsl:template match="Registration/Step1">

    <script type="text/javascript">

      var onRegistrationSubmit = function(e) {
      YAHOO.util.Event.preventDefault(e);
      var ret = validateForm();
      if( ret != false ) {
      doesUserOrEmailAlreadyExist()

      }
      //      alert("Hello World!");
      }

      YAHOO.util.Event.addListener("signup_submit", "click", onRegistrationSubmit);
      //      YAHOO.util.Event.on("formRegistration", "submit", onRegistrationSubmit);

      function onPushButtonsMarkupReady() {
      if( $('country').value != "none" ) $('country').selectedIndex=0;
      }

      YAHOO.util.Event.onContentReady("formRegistration", onPushButtonsMarkupReady);

      //      initLoadingContainer();

    </script>

    <script>
      function validateForm() {

      document.returnValue = false;
      var gg = document.getElementById("ggBirth").value;
      var mm = document.getElementById("mmBirth").value;
      var aa = document.getElementById("aaaaBirth").value;
      if (isDate(	gg, mm, aa)){
      document.returnValue = true;
      }else{
      alert("Inserisci una data di nascita valida, dai!");
      return false;
      }


      document.returnValue = false;
      email = document.getElementById("email").value;
      if( isEmail(email) ){
      alert("Inserisci un email address valido, dai!");
      return false;
      }else
      document.returnValue = true;


      document.returnValue = false;
      document.returnValue = isUsername(document.getElementById("username").value);
      if( document.returnValue == false )
      return false;


      document.returnValue = false;
      var country = document.getElementById("country").value;
      var region = document.getElementById("region").value;
      var citycode = document.getElementById("citycode").value;

      if( $('country').value == "none" || $('country').value == "" ){
      alert("Inserisci una country valida, dai!");
      return false;
      }else{
      document.returnValue = true;
      }
      document.returnValue = false;
      if( $('region').value == "none" || $('region').value == "" ){
      alert("Inserisci una region valida, dai!");
      return false;
      }else{
      document.returnValue = true;
      }
      document.returnValue = false;
      if( $('citycode').value == "none" || $('citycode').value == "" ){
      alert("Inserisci una city valida, dai!");
      return false;
      }else{
      document.returnValue = true;
      }

      document.returnValue = false;
      if( $('D40').value == "125" ){
      alert("Devi autorizzarci al trattamento dei tuoi dati conformemente all'art.13 L.196/03!");
      return false;
      }else{
      document.returnValue = true;
      }

      }


    </script>
  
    
    <form name="formRegistration" id="formRegistration" method="post" action="registration2.aspx?step=2" onSubmit="">
      <input type="hidden" name="D8" id="D8" value="18"/>
      <input type="hidden" name="D29" id="D29" value="107"/>
      <input type="hidden" name="D35" id="D35" value="119"/>
      <input type="hidden" name="D39" id="D39" value="empty"/>
      <center>
        <div class="round_me" style="background:#FEEECC; padding:20px; margin:10px; width:75%;">
      <table class="body" border="0">

        <xsl:for-each select='Question'>
          <xsl:choose>
            <xsl:when test='@id="1"'>
              <tr>
                <td class='title' colspan='2'>
                  <xsl:value-of select="@description"/>
                </td>

              </tr>
            </xsl:when>
            <xsl:when test='@id="2"'>
              <tr>
                <td colspan='2' style='padding-top:20px; padding-bottom:00px; border-top:2px solid white; height:20px;'>
                  <!--<xsl:value-of select="@description"/>-->
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="3"'>
              <tr>
                <td colspan='2' style='padding-top:20px; padding-bottom:20px; border-top:2px solid white;'>
                  <b>
                    <xsl:value-of select="@description"/>
                  </b>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="4"'>
              <tr>
                <td>
                </td>
                <td style='padding-top:20px;padding-bottom:20px;'>
                  <INPUT TYPE='CHECKBOX' NAME="joke01" checked="true" disabled="true" style="height:15px; width:15px;">
                    <xsl:value-of select="@description"/>
                  </INPUT>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="5"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="6"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="7"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select name="ggBirth" id="ggBirth">
                    <option value="none" selected="true" disabled="true">
                      day
                    </option>
                    <option value="" disabled="true">
                      ----
                    </option>
                    <xsl:call-template name="ggBirthRecursive">
                      <xsl:with-param name="index" select="1"/>
                      <xsl:with-param name="limit" select="31"/>
                    </xsl:call-template>
                  </select>
                  &#160;/&#160;
                  <select name="mmBirth" id="mmBirth">
                    <option value="none" selected="true" disabled="true">
                      month
                    </option>
                    <option value="" disabled="true">
                      -------
                    </option>
                    <option value="01">
                      Gennaio
                    </option>
                    <option value="02">
                      Febbraio
                    </option>
                    <option value="03">
                      Marzo
                    </option>
                    <option value="04">
                      Aprile
                    </option>
                    <option value="05">
                      Maggio
                    </option>
                    <option value="06">
                      Giugno
                    </option>
                    <option value="07">
                      Luglio
                    </option>
                    <option value="08">
                      Agosto
                    </option>
                    <option value="09">
                      Settembre
                    </option>
                    <option value="10">
                      Ottobre
                    </option>
                    <option value="11">
                      Novembre
                    </option>
                    <option value="12">
                      Dicembre
                    </option>
                  </select>
                  &#160;/&#160;
                  <select name="aaaaBirth" id="aaaaBirth">
                    <option value="none" selected="true" disabled="true">
                      year
                    </option>
                    <option value="" disabled="true">
                      ----
                    </option>
                    <xsl:call-template name="ggBirthRecursive">
                      <xsl:with-param name="index" select="1920"/>
                      <xsl:with-param name="limit" select="1997"/>
                    </xsl:call-template>
                  </select>

                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="8"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <input type="text" name="D{@id}" size="4" maxlength="4"/>

                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="9"'>
              <tr>
                <td valign='top'>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <div style='padding-top:15px;'>
                    <div>
                      <select name="country" id="country" onchange="javascript:updateRegions();">
                        <option value="none" selected="true" disabled="true">
                          select a country
                        </option>
                        <option value="" disabled="true">
                          ------------------
                        </option>
                        <xsl:for-each select="/Registration/countries/country">
                          <xsl:choose>
                            <xsl:when test='@Selected="1"'>
                              <option value="{@iso2}" selected="true">
                                <xsl:value-of select="@name"/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@iso2}">
                                <xsl:value-of select="@name"/>
                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </div>
                  </div>
                  <div>
                    <div>
                      <select name="region" id="region" style="color:grey;" onchange="javascript:updateCities();">
                        <option value="" >region</option>
                        <option value="">select a country first</option>
                      </select>
                    </div>
                  </div>

                  <div>
                    <div>
                      <div id="city" name="city" style="z-index:2;">
                        <select name="citycode" id="citycode" style="display:none;margin-top:10px;margin-bottom:0px;">
                          <option value="">...</option>
                        </select>
                      </div>
                      <!--<span id="cityloading" style="display:none">loading...</span>-->
                    </div>
                  </div>
                </td>
              </tr>
             
            </xsl:when>
            
            
            <xsl:when test='@id="10"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="11"'>
              <tr>
                <td valign='top'>
                  <xsl:value-of select="@description"/>
                </td>
                <td style="padding-bottom:10px;">
                  <select size="1" name="sex">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="12"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="13"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="14"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="15"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="16"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="17"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="18"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="19"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="20"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="21"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="22"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="23"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="24"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="25"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="26"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <option value="{@ID}">
                        <xsl:value-of select="."/>
                      </option>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="27"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <img src="{@comment}" name="I{@id}"/>

                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="28"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="29"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="30"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="31"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="32"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="33"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="34"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="35"'>
              <tr>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="36"'>
              <tr valign='top'>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td style="padding-bottom:10px;">
                  <input type="text"  name="username" id="username"/>
                  <br/>
                  <span class="shycomment">
                    <xsl:value-of select="@comment"/>
                  </span>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="37"'>
              <tr valign='top'>
                <td >
                  <xsl:value-of select="@description"/>
                </td>
                <td style="padding-bottom:10px;">
                  <xsl:value-of select="@comment"/>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="38"'>
              <tr valign='top'>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td style='padding-bottom:10px;'>
                  <input type="text"  name="email" id="email" style="width:25em;"/>
                  <br/>
                  <span class="shycomment">
                    <xsl:value-of select="@comment"/>
                  </span>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="39"'>
              <tr valign='top'>
                <td>
                  <xsl:value-of select="@description"/>
                </td>
                <td>
                  <textarea rows="5" cols="35" name="D{@id}">
                  </textarea>

                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="40"'>
              <tr valign='top'>
                <td colspan='2' style='padding-top:10px;padding-bottom:0px;'>
                  <hr width='75%'/>
                  <center>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <a href="http://www.dammela.it/help/informativa.popup.html" onclick="javascript:window.open('/help/informativa.popup.html','','width=250,height=350');return false;">(leggi l'informativa)</a>
                  <br/>
                  <select size="1" name="D{@id}" id="D{@id}" style="margin-top:5px;">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                  </center>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="41"'>
              <tr valign='top'>
                <td colspan='2' style='padding-top:10px;padding-bottom:0px;'>
                  <center>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                  </center>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="42"'>
              <tr valign='top'>
                <td colspan='2' style='padding-top:10px;padding-bottom:10px;'>
                  <center>
                  <xsl:value-of select="@description"/>
                  <br/>
                  <select size="1" name="D{@id}">
                    <xsl:for-each select="Answer">
                      <xsl:choose>
                        <xsl:when test='@Selected="1"'>
                          <option value="{@ID}" selected="true">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:when>
                        <xsl:otherwise>
                          <option value="{@ID}">
                            <xsl:value-of select="."/>
                          </option>
                        </xsl:otherwise>
                      </xsl:choose>
                    </xsl:for-each>
                  </select>
                  </center>
                </td>
              </tr>
            </xsl:when>
            <xsl:when test='@id="43"'>
              <tr>
                <td colspan='2' align='center' style='padding-top:20px;padding-bottom:20px;'>
                  <p class="submit">
                    <input type="submit" id="signup_submit" name="{concat('SUBMIT',@ID)}" value="{@description}"></input>
                  </p>
                </td>

              </tr>
            </xsl:when>
          </xsl:choose>
        </xsl:for-each>


      </table>
      </div>
      </center>
    </form>

        
    </xsl:template>

</xsl:stylesheet>